/******************************************************************************
 **                                                                           **
 **                 Proprietary and Confidential Information                  **
 **                                                                           **
 **                 Copyright (c) Conexant, Inc. Unpublished                  **
 **                                                                           **
 ** This source code and the algorithms implemented therein constitute        **
 ** confidential information and may compromise trade secrets of Conexant Systems,    **
 ** Inc. or its associates, and any unauthorized use thereof is prohibited.   **
 **                                                                           **
 ******************************************************************************/
#ifndef __DC_PRINTER_RGBCLIENT_API_H__
#define __DC_PRINTER_RGBCLIENT_API_H__
#include "dc_print_subsystem_config.h"
#include "dc_print_control_api.h"
#define USING_BMP	0
#define	USING_USB	0
//#include "dc_print_management_api.h"
/**************************************************************************
 * file: dc_printer_rgbclient_api.h
 *       This file include defination of printer client
 *
 ******************************************************************************
 *  FILE FORMAT:
 *      1. ENUMERATIONS
 *      2. DEFINES
 *      3. STRUCTURES
 *      4. ALLOCS
 *      5. FUNCTIONS
 ******************************************************************************/
/******************************************************************************
 *  1. ENUMERATIONS
 ******************************************************************************/
typedef enum
{
	PRINT_CLIENT_REQUEST_NONE,
	PRINT_CLIENT_REQUEST_TEST,
	PRINT_CLIENT_COPY_REQUEST_TEST,
	PRINT_CLIENT_REQUEST_COMPRESSED_RASTER,
} PRINTCLIENT_REQUEST_t;

typedef enum
{
	PRINT_CLIENT_RESPONSE_IDLE,
	PRINT_CLIENT_RESPONSE_BUSY,
	PRINT_CLIENT_RESPONSE_DONE,
} PRINTCLIENT_RESPONSE_t;

typedef enum
{
	PRINT_MANAGEMENT_REQUEST_DOING, PRINT_MANAGEMENT_REQUEST_DONE,
} PRINTMANAGE_REQUEST_t;

typedef enum
{
	PRINT_MANAGEMENT_RESPONSE_DOING, PRINT_MANAGEMENT_RESPONSE_DONE,
} PRINTMANAGE_RESPONSE_t;

typedef enum
{
	PRINT_ERROR_REQUEST, PRINT_ERRORECOVER_REQUEST_DONE,
} PRINTERROR_REQUEST_t;

typedef enum
{
	PRINT_ERROR_RESPONSE_DOING, PRINT_RECOVERDONE_RESPONSE_DONE,
} PRINTERROR_RESPONSE_t;
// temperate moved here from laser_demo/managerment_module
typedef enum
{
	DBGMON_JOB_CANCEL,
	DBGMON_PAGE_CANCEL,
	DBGMON_UTILITY,
	DBGMON_POWER,
	DBGMON_ERROR_RECOVER,
	DBGMON_DEFAULT_LAST,
} PR_MANAGE_REQUEST_TYPE_t;

/******************************************************************************
 *  2. DEFINES
 ******************************************************************************/
#define PRINT_TYPE_NONE    0x01
#define PRINT_TYPE_GENERAL 0x02
#define PRINT_TYPE_COPY    0x04

#define	PC_SILENT	1
#if	PC_SILENT
#define PC_LOG(...) {}
#else
#define PC_LOG(...) {dc_log_printf3  ("%s[%d]\t",__FILE__,__LINE__); dc_log_printf2(__VA_ARGS__);}
#endif
/******************************************************************************
 *  1. STRUCTURE
 ******************************************************************************/
#define COMPRESSED_RASTER_BUFFER_SIZE (512*1024)
typedef struct
{
	PRINTCLIENT_REQUEST_t request;
	PRINTCLIENT_RESPONSE_t response;
	PRINTMANAGE_REQUEST_t manageReq;
	PRINTMANAGE_RESPONSE_t manageRes;
	PRINTERROR_REQUEST_t errorReq;
	PRINTERROR_RESPONSE_t errorRes;
	PR_JOB_PARAMETERS jobParams;
	PR_PAGE_PARAMETERS pageParams;
	UINT32 compressedRasterBufferBase;
	UINT32 compressedRasterBufferSize;
	UINT32 compressedRasterWrPtr;
	UINT32 compressedRasterRdPtr;
	// management request
	PR_MANAGE_REQUEST_TYPE_t reqType;
	UINT32 jobID;
	UINT32 pageID;
	PR_POWER_REQUEST powerReq;
	PR_UTILITY_TYPE utilType;
	void *utilParamsPtr;
} DC_DBGMON_LASERDEMOTEST_CB_t;

#ifdef ALLOC_DC_LASERDEMO_TEST
ARM_VOLATILE DC_DBGMON_LASERDEMOTEST_CB_t lasertestcb;
#else
extern ARM_VOLATILE DC_DBGMON_LASERDEMOTEST_CB_t lasertestcb;
#endif

/******************************************************************************
 *  5. FUNCTIONS
 ******************************************************************************/
DC_RETURN_CODE dc_pc_rgb_setup(DC_MEM_PARAMS_t * requiredMemAmount);
DC_RETURN_CODE dc_pc_rgb_init(DC_MEM_PARAMS_t * requiredMemAmountd);
DC_RETURN_CODE dc_pc_rgb_workingMem_setup(DC_MEM_PARAMS_t * requiredMemAmount);
DC_RETURN_CODE dc_pc_rgb_imageset_input(DC_IMAGE_CHANNELS channels,
		DC_IMAGE_BITDEPTH bitdepth, DC_IMAGE_FORMAT format, UINT32 printType,
		UINT8 pageNum);

#endif //__DC_PRINTER_RGBCLIENT_API_H__
